iT邦幫忙

1

【報錯解法】load_dataset 沒讀到資料 - FileNotFoundError: Unable to resolve any data file that matches

  • 分享至 

  • xImage
  •  

程式碼

from datasets import load_dataset
giga = load_dataset('gigaword')

報錯內容

FileNotFoundError: Unable to resolve any data file that matches '['**train*']' at /mnt/lustre/home/user_name/gigaword with any supported extension ['csv', 'tsv', 'json', 'jsonl', 'parquet', 'txt', 'blp', 'bmp', 'dib', 'bufr', 'cur', 'pcx', 'dcx', 'dds', 'ps', 'eps', 'fit', 'fits', 'fli', 'flc', 'ftc', 'ftu', 'gbr', 'gif', 'grib', 'h5', 'hdf', 'png', 'apng', 'jp2', 'j2k', 'jpc', 'jpf', 'jpx', 'j2c', 'icns', 'ico', 'im', 'iim', 'tif', 'tiff', 'jfif', 'jpe', 'jpg', 'jpeg', 'mpg', 'mpeg', 'msp', 'pcd', 'pxr', 'pbm', 'pgm', 'ppm', 'pnm', 'psd', 'bw', 'rgb', 'rgba', 'sgi', 'ras', 'tga', 'icb', 'vda', 'vst', 'webp', 'wmf', 'emf', 'xbm', 'xpm', 'zip']

報錯原因
因為在目錄有相同名稱的資料夾 gigaword,造成 load_datasets官網說明) 把它當成要讀取的路徑,所以要避免讓路徑中出現和 dataset_name 一樣的名稱。


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言